const publics = {
    data() {
        return {
            del_id:'',
        }
    },
    methods:{
        //删除提示
    clickTips(id,title='提示',text='是否确认删除该条数据?',fun) {
        let _this=this
        this.del_id=id
        this.$confirm({
            title: title,
            content: text,
            okText: '确定',
            okType: 'primary',
            cancelText: '取消',
            onOk() {
                //有回调执行回调 没有回调执行默认
                if(typeof fun === "function"){
                    fun(id)
                }else{
                    _this.tipsFn(id)
                }
            },
            onCancel() {
                console.log('Cancel')
            }
        })
      },
      jump(name,query){
        this.$router.push({
            name:name,
            query:query
          })
      },
    }
}

export default publics;